@import './index.less';


#app {
  height: 100%;

  &.colorWeak {
    filter: invert(80%);
  }
  &.userLayout {
    overflow: auto;
  }
}

.layout.ant-layout {
  height: auto;
  overflow-x: hidden;

  &.mobile,
  &.tablet {
    .ant-layout-content {
      // background-color: red;
      .content {
        margin: 24px 0 0;
      }
    }

    /**
     * ant-table-wrapper
     * 覆盖的表格手机模式样式，如果想修改在手机上表格最低宽度，可以在这里改动
     */
    .ant-table-wrapper {
      .ant-table-content {
        overflow-y: auto;
      }
      .ant-table-body {
        min-width: 800px;
      }
    }
    .topmenu {
      /* 必须为 topmenu  才能启用流式布局 */
      &.content-width-Fluid {
        .header-index-wide {
          margin-left: 0;
        }
      }
    }
  }

  &.mobile {
    .sidemenu {
      .ant-header-fixedHeader {
        &.ant-header-side-opened,
        &.ant-header-side-closed {
          width: 100%;
        }
      }
    }
  }

  &.ant-layout-has-sider {
    flex-direction: row;
    height: 100vh;
  }

  .trigger {
    font-size: 20px;
    line-height: 64px;
    padding: 0 24px;
    cursor: pointer;
    transition: color 0.3s;
    &:hover {
      background: rgba(0, 0, 0, 0.025);
    }
  }

  .topmenu {
    .ant-header-fixedHeader {
      // position: fixed;
      top: 0;
      right: 0;
      z-index: 9;
      width: 100%;
      transition: width 0.2s;

      &.ant-header-side-opened {
        width: 100%;
      }

      &.ant-header-side-closed {
        width: 100%;
      }
    }
    /* 必须为 topmenu  才能启用流式布局 */
    &.content-width-Fluid {
      .header-index-wide {
        max-width: unset;
        .header-index-left {
          flex: 1 1 1000px;
          .logo{
            margin-left: 25px;
          }
          .ant-menu.ant-menu-horizontal{
            max-width: calc(100vw - 190px - 238px - 25px);
            flex: 1 1 calc(100vw - 190px - 238px - 25px);
          }
        }
        .header-index-right{
          margin-right:25px;
        }
      }

      .page-header-index-wide {
        max-width: unset;
      }
    }
  }

  .sidemenu {
    .ant-header-fixedHeader {
      // position: fixed;
      top: 0;
      right: 0;
      z-index: 9;
      width: 100%;
      transition: width 0.2s;

      &.ant-header-side-opened {
        width: calc(100% - 215px);
      }

      &.ant-header-side-closed {
        width: calc(100% - 80px);
      }
    }
  }

  .header {
    height: 64px;
    padding: 0 12px 0 0;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: relative;
  }

  .header,
  .top-nav-header-index {
    .user-wrapper {
      float: right;
      height: 100%;

      .action {
        cursor: pointer;
        padding: 0 12px;
        display: inline-block;
        transition: all 0.3s;
        height: 100%;
        color: rgba(0, 0, 0, 0.65);

        &:hover {
          background: rgba(0, 0, 0, 0.025);
        }

        .avatar {
          margin: 20px 8px 20px 0;
          color: #364DD1;
          background: hsla(0, 0%, 100%, 0.85);
          vertical-align: middle;
        }

        .icon {
          font-size: 16px;
          padding: 4px;
        }
      }
    }

    &.dark {
      .user-wrapper {
        .action {
          color: rgba(255, 255, 255, 0.85);
          a {
            color: rgba(255, 255, 255, 0.85);
          }

          &:hover {
            background: rgba(255, 255, 255, 0.16);
          }
        }
      }
    }
  }

  &.mobile,
  &.tablet {
    .top-nav-header-index {
      .header-index-wide {
        .header-index-left {
          .trigger {
            color: rgba(255, 255, 255, 0.85);
            padding: 0 12px;
          }

          .logo.top-nav-header {
            flex: 0 0 56px;
            text-align: center;
            line-height: 58px;
            h1 {
              display: none;
            }
          }
        }
      }

      &.light {
        .header-index-wide {
          .header-index-left {
            .trigger {
              color: rgba(0, 0, 0, 0.65);
            }
          }
        }
        //
      }
    }
  }

  &.tablet {
    // overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
    .top-nav-header-index {
      .header-index-wide {
        .header-index-left {
          .logo > a {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
        .ant-menu.ant-menu-horizontal {
          flex: 1 1 auto;
          white-space: normal;
        }
      }
    }
  }

  .top-nav-header-index {
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    position: relative;
    transition: background 0.3s, width 0.2s;

    .header-index-wide {
      max-width: 1200px;
      margin: auto;
      padding-left: 0;
      display: flex;
      height: 64px;

      .ant-menu.ant-menu-horizontal {
        max-width: 835px;
        flex: 0 1 835px;
        border: none;
        height: 64px;
        line-height: 64px;
      }

      .header-index-left {
        flex: 0 1 1000px;
        display: flex;

        .logo.top-nav-header {
          flex: 0 0 165px;
          width: 165px;
          height: 64px;
          position: relative;
          line-height: 64px;
          transition: all 0.3s;
          overflow: hidden;

          img,
          svg {
            display: inline-block;
            vertical-align: middle;
            height: 32px;
            width: 32px;
          }

          h1 {
            color: #fff;
            display: inline-block;
            vertical-align: top;
            font-size: 16px;
            margin: 0 0 0 12px;
            font-weight: 400;
          }
        }
      }

      .header-index-right {
        flex: 0 0 238px;
        align-self: flex-end;
        height: 64px;
        overflow: hidden;

        .content-box {
          float: right;
        }
      }
    }

    &.light {
      background-color: #fff;

      .header-index-wide {
        .header-index-left {
          .logo {
            h1 {
              color: #002140;
            }
          }
        }
      }
    }
  }

  // 内容区
  .layout-content {
    // margin: 24px 24px 0px;
    height: 100%;
    height: 64px;
    padding: 0 12px 0 0;
  }

  // footer
  .ant-layout-footer {
    padding: 0;
  }
}

.topmenu {
  .page-header-index-wide {
    max-width: 1200px;
    margin: 0 auto;
  }
}

.page-header .page-header-index-wide{
  width: 100%;
}

// drawer-sider 自定义
.ant-drawer.drawer-sider {
  .sider {
    box-shadow: none;
  }

  &.dark {
    .ant-drawer-content {
      background-color: rgb(0, 21, 41);
    }
  }
  &.light {
    box-shadow: none;
    .ant-drawer-content {
      background-color: #fff;
    }
  }

  .ant-drawer-body {
    padding: 0;
  }
}

// 菜单样式
.sider {
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  position: relative;
  z-index: 10;
  // min-height: calc(100% - 60px);

  .ant-layout-sider-children {
    overflow-y: hidden;

    &:hover {
      overflow-y: auto;
    }
    &::-webkit-scrollbar {
      display: none;
    }
  }

  &.ant-fixed-sidemenu {
    position: fixed;
    height: 100%;
  }

  .logo {
    position: relative;
    height: 64px;
    padding-left: 24px;
    overflow: hidden;
    line-height: 64px;
    background: #002140;
    transition: all .3s;

    img,
    svg,
    h1 {
      display: inline-block;
      vertical-align: middle;
    }

    img,
    svg {
      height: 32px;
      width: 32px;
    }

    h1 {
      color: #fff;
      font-size: 20px;
      margin: 0 0 0 12px;
      font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
      font-weight: 600;
      vertical-align: middle;
    }
  }

  &.light {
    background-color: #fff;
    box-shadow: 2px 0px 8px 0px rgba(29, 35, 41, 0.05);

    .logo {
      background: #fff;
      box-shadow: 1px 1px 0px 0px #e8e8e8;

      h1 {
        color: unset;
      }
    }

    .ant-menu-light {
      border-right-color: transparent;
    }
  }
}

// 外置的样式控制
.user-dropdown-menu {
  span {
    user-select: none;
  }
}
.user-dropdown-menu-wrapper.ant-dropdown-menu {
  padding: 4px 0;

  .ant-dropdown-menu-item {
    width: 160px;
  }

  .ant-dropdown-menu-item > .anticon:first-child,
  .ant-dropdown-menu-item > a > .anticon:first-child,
  .ant-dropdown-menu-submenu-title > .anticon:first-child .ant-dropdown-menu-submenu-title > a > .anticon:first-child {
    min-width: 12px;
    margin-right: 8px;
  }
}

// 数据列表 样式
.table-alert {
  margin-bottom: 16px;
}

.ant-form-item{
  margin-top: 5px !important;
  margin-bottom: 5px !important;
  margin-right: 0; 
}

.table-page-search-wrapper {
  margin-bottom: 10px;
  .ant-form{
    display: flex;
    align-items: center;
    flex-flow: row wrap;
  }
  .ant-form-item{
    margin-right: 15px  !important;
  }
  .ant-form-item-label > label{
    color: #686D7E !important;
  }
  .ant-select{
    width: 200px !important;
  }
}

.content {
  .table-operator {
    margin-top: 10px;
    margin-bottom: 18px;
    button {
      margin-right: 8px;
    }
    .ant-btn {
      height: 28px;
      font-size: 13px;
    }
  }
}

&::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

&::-webkit-scrollbar-track {
  background-color: white;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}

&::-webkit-scrollbar-thumb {
  background-color: #f5f5f5;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}
.ant-modal-body {
  max-height: 76vh;
  overflow-y: auto;
  .table-operator {
    margin-bottom: 10px;
    button {
      margin-right: 8px;
    }
  }
}
.dropdown-action {
  background-color: #fff;
  box-shadow: 0 2px 8px rgb(187, 176, 176);
  a {
    display: block;
    height: 30px;
    line-height: 30px;
    padding: 0 20px;
    text-align: center;
    color: #645f5f;
    font-size: 13px;
    i {
      margin-right: 10px;
    }
  }
  .ant-divider.ant-divider-vertical{
    display: block;
    height: 0;
  }
}
.ant-table-thead > tr > th {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  .ant-table-column-title:extend(.ant-table-thead > tr > th) {
    display: block;
  }
}
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
  max-width: 250px;
}
.ant-table-tbody > tr > td:extend(.ant-table-thead > tr > th) {}
.ant-table-scroll {
  overflow-x: auto;
}

.ant-table-content, .ant-table-scroll {
  a { 
    font-size: 13px;
  }
  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  &::-webkit-scrollbar-track {
    background-color: #f5f5f5;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #364DD1;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
  }
}


// 表单 
.form-fl {
  display: flex;
  flex-flow: row wrap;
}
.form-fl > div {
  width: 50%;
}

// 禁用
// 详情上 需要禁用的样式 父级添加 disable 样式 即可
.disable{
  .ant-input[disabled],.ant-select-disabled,.ant-select-disabled .ant-select-selection,.ant-select-disabled .ant-select-selection--multiple .ant-select-selection__choice{
    color: rgba(0, 0, 0, 0.65) !important;
    background-color: white !important;
    cursor: auto  !important;
  }
}


// 去掉表单后面的冒号
.ant-form-item label:after {
  content: ' ';
}

// 表格按照ui 调整
.tb-head th{
  background: #F6F7FB !important;
  font-size: 16px !important;
  font-weight: bolder !important;
}
.ant-modal-body{
  max-height:70vh;
}
.modal-title{
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bolder;
  color: #333333;
  img{
    width: 18px;
    height: 18px;
    display:block;
    margin-right: 9px;
  }
}



// 主体色
.ant-tag-blue{
  color: #364DD1;
  background: #e6f7ff;
  border-color: #5d75de;
}
.ant-btn-primary:active, .ant-btn-primary.active{
background: #364DD1 !important;
}
.ant-btn-primary:hover, .ant-btn-primary:focus{
  background: #364DD1 !important;
}

// 弹窗偏移
.ant-modal-wrap{
  left: 215px;
  display: flex;
  justify-content: center;
  align-items: center;
}


// a标签 禁用样式
.a-disabled {
  color: rgba(0, 0, 0, 0.25) !important;
  cursor: not-allowed;
}

.ant-layout-content{
  margin: 0 !important;
}


// 图片预览样式
.viewer-title{
  display: none !important;
}

.ant-card-body{
  padding:5px 10px !important;
}

.ant-table-pagination.ant-pagination{
  margin: 16px 0 0 0 !important;
}
.ant-modal {
  top: 0px !important;
  padding-bottom: 0 !important;
}

